Debugging Python 3.11.4
To begin debugging in Python,
begin your program with:
import
pdb
pdb.set_trace()
1.
h(elp)
2.
s(tep)
3.
n(ext)
4.
unt(il)
[lineno]
5.
r(eturn)
6.
c(ont(inue))
7.
j(ump)
8.
l(ist)
9.
ll
– longlist
10.
p
expression
11.
display
[expression]
12.
source
[expression]
13.
q(uit)
14.
retval
– Print the return value of the las return of the current function
Also useful is:
import
pdb
pdb.help()
________________________________________________________________________________________________________________
References